package kr.hkit.powerjava.chapter9;

public class Car {
	private static int numberOfCars = 0;
	
	private String coloer;
	private int speed;
	private int gear;
	private int id;

	public Car(String coloer, int speed, int gear) {
		super();
		this.coloer = coloer;
		this.speed = speed;
		this.gear = gear;
		this.id = ++Car.numberOfCars;
	}
	public static void main(String[] args) {
		

		Car blue = new Car("blue",100,5);
		Car red = new Car("red",100,2);
	int n = Car.numberOfCars;
	System.out.println(n);
	}
	public static int getNumberOfCars() {
		return numberOfCars;
	}
	
	
}
